﻿using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Audio;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.GamerServices;
using Microsoft.Xna.Framework.Graphics;
using Microsoft.Xna.Framework.Input;
using Microsoft.Xna.Framework.Media;
using Microsoft.Xna.Framework.Net;
using Microsoft.Xna.Framework.Storage;
using Microsoft.Xna.Framework.Graphics.PackedVector;

namespace ProceduralGolf.generation
{
    class HeightmapGenerator
    {
        private TexturePerlinNoiser perlin;

        public HeightmapGenerator(Game game)
        {
            perlin = new TexturePerlinNoiser(game);
        }

        public Heightmap generate(int width, int height, float scale)
        {
            return generate(width, height, scale, 3, 2.0f, 0.5f, 5.0f, 0.5f);
        }

        public Heightmap generate(int width, int height, float scale, int octaves, float lacunarity, float gain, float freq, float amp)
        {
            return new Heightmap(perlin.noise(width, height, octaves, lacunarity, gain, freq, amp), scale);
        }

    }
}
